#ifndef Q_FINGER_PUSH_BUTTON_H
#define Q_FINGER_PUSH_BUTTON_H

#include <QtGui/QAbstractButton>
#include <QtGui/QPicture>
#include <QtSvg/QSvgRenderer>
#include <QtGui/QPainter>
#include <QMenu>
#include <QContextMenuEvent>

class QSvgRenderer;

class QFingerPushButton : public QAbstractButton
{
    Q_OBJECT

public:
    explicit QFingerPushButton(QWidget *parent = 0);
    ~QFingerPushButton() {};

    void setSkin(const QString &skin);
    QString skin() const;

    virtual QSize sizeHint() const;
    void setEnrolled(bool);

private:
    QRect buttonRect() const;
    QSize m_defaultSize;
    QPicture m_normal;
    QPicture m_hovered;  
    QPicture m_pressed; 
    QPicture m_enrolled;
    QString m_skin;
    void contextMenuEvent(QContextMenuEvent *event);
    QAction *actionEnroll;
    QAction *actionVerify;
    QAction *actionRemove;
    QMenu *menu;
    bool enrolled;

protected:
    virtual void paintEvent(QPaintEvent* event);

signals:
    void enroll();
    void remove();
    void verify();
};

#endif // Q_FINGER_PUSH_BUTTON_H
